﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Web.Configuration;
using OneMile.Common;

namespace YGWebMobileApi
{
    public class Global : System.Web.HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {
            // 设置日志路径
            ErrorLogWriter.BaseDirectory = WebConfigurationManager.AppSettings["YGWebMobileApi.LogPath"];
            MobileMsgLogWriter.BaseDirectory = WebConfigurationManager.AppSettings["YGWebMobileApi.LogPath"];
        }

        protected void Session_Start(object sender, EventArgs e)
        {

        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {
            //检测SQL注入
            //CheckSqlInject myCheck = new CheckSqlInject(this.Request);
            //if (myCheck.CheckRequestForm() || myCheck.CheckRequestQuery())
            //{
            //    Response.Write("有");
            //}
            //else
            //{
            //    Response.Write("无");
            //}
        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {

        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
    }
}